/**
 * 
 */
package com.unism.util;

/**
 * @author time
 *
 */
public enum PnetType {
	MAIN_PIPE("主干管",0),SUB_PIPE("分干管",1),OUT_PIPE("出地桩",2);
	private String name;
	private Integer index;
	private PnetType(String name, Integer index) {
		this.name = name;
		this.index = index;
	}
	public static Integer getIndex(String name) {
		PnetType[] types = PnetType.values();
		for (PnetType pnetType : types) {
			if (name.equals(pnetType.getName())) {
				return pnetType.getIndex();
			}
		}
		return null;
	}
	public String getName() {
		return name;
	}
	public void setName(String name) {
		this.name = name;
	}
	public Integer getIndex() {
		return index;
	}
	public void setIndex(Integer index) {
		this.index = index;
	}
	
}
